package com.crois.barrier.server.netty;

import org.springframework.boot.web.embedded.netty.NettyReactiveWebServerFactory;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author Hou Ze Yu
 * @description
 * @date 2021/4/21
 */
@Configuration
public class BarrierNettyWebServerFactory {

    @Bean
    public NettyReactiveWebServerFactory nettyReactiveWebServerFactory() {
        NettyReactiveWebServerFactory webServerFactory =new NettyReactiveWebServerFactory();
        webServerFactory.addServerCustomizers(new BarrierNettyServerCustomizer());
        return webServerFactory;
    }
}
